home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-21 / qwhite.zip / SHADOWRM.TEC < prev    next >
Text File  |  1992-03-09  |  13KB  |  238 lines

  1. ID:SR ShadowRAM, Top Memory, and QEMM-386
  2. Quarterdeck Technical Bulletin #224
  3. by Quarterdeck Testing & Compatibility Department
  4. December 26, 1991
  5.  
  6.                         SHADOWRAM & TOP MEMORY
  7.  
  8.      This document discusses copying ROMs into RAM, explaining how this 
  9. service is performed by the hardware of many DOS computers, by QEMM-386, and 
  10. by some third-party programs.
  11.  
  12. WHAT IS SHADOWRAM?
  13.  
  14.      ShadowRAM is 384K of RAM that can be mapped into the address space 
  15. between 640K and 1024K.  What computers use it for is to copy the contents of 
  16. the system BIOS ROM, perhaps video ROM, and, less likely, other ROMs (disk 
  17. controller ROM, network card ROM, etc.) into RAM, where it will run more 
  18. quickly.  RAM is read more quickly than ROM both because RAM is faster and 
  19. because ROM is read eight bits at a time (or sixteen bits at a time on some 
  20. machines) while RAM is read 32 bits at a time (on a 386 or 486) or 16 bits at 
  21. a time (on a 386sx).
  22.  
  23.  
  24. HOW DO I KNOW IF I HAVE SHADOWRAM?
  25.  
  26.      The QEMM-386/Memory screen of MANIFEST will indicate that you have 
  27. ShadowRAM on the line underneath the Extended line.
  28.  
  29.  
  30. ARE MACHINES WITH CHIPS & TECHNOLOGIES MOTHERBOARDS THE ONLY MACHINES WITH 
  31. SHADOWRAM?
  32.  
  33.      While ShadowRAM was invented by Chips & Technologies other computers 
  34. (including IBM PS/2s) may have RAM reserved for a similar purpose.  QEMM-386 
  35. will not detect this reserved RAM on machines that do not use Chips & 
  36. Technologies or compatible ShadowRAM.  ShadowRAM that is not Chips & 
  37. Technologies or compatible ShadowRAM may not be 384K but some smaller amount. 
  38. If the documentation or system setup of your computer does not tell you 
  39. whether you have this feature you can look at the QEMM-386/Memory screen of 
  40. MANIFEST in order to discover whether you have this feature because the amount 
  41. of memory reported in the Initial column of the Total line will not match the 
  42. total amount of memory in your system if your computer has ShadowRAM that QEMM-
  43. 386 does not use.  On an IBM PS/2 the discrepancy is 128K.  The QEMM- 
  44. 386/Memory screen will only report Chips & Technologies (or compatible) 
  45. ShadowRAM on a ShadowRAM line in Manifest.
  46.  
  47.  
  48. HOW CAN I TELL IF MY SHADOWRAM (OR EQUIVALENT) IS WORKING?
  49.  
  50.       The FirstMeg/Timings screen of MANIFEST reports that the portions of the 
  51. address space occupied by ROM run about as quickly as conventional memory 
  52. (usually 0000-9FFF) if your ROMs are being shadowed (copied into RAM).
  53.  
  54.  
  55. WHAT IF MY MACHINE DOES NOT PROVIDE THIS FEATURE?
  56.  
  57.       QEMM-386 can shadow ROMs.  It does this by copying the contents of the 
  58. ROM into RAM, mapping this RAM into the address space occupied by the ROM, 
  59. then write-protecting this RAM.  You get this feature by putting the ROM 
  60. parameter on the QEMM386.SYS line of the CONFIG.SYS.  First Meg/Timings will 
  61. demonstrate that this is working.
  62.      It is possible to shadow only some of your ROMs with QEMM-386.  The ROM 
  63. parameter can be used to shadow only a limited portion of the address space by 
  64. using, say, ROM=C800-CBFF.  This parameter can be used multiple times to 
  65. shadow different ROMs.  A good reason to do this is if you have ROM on an add-
  66. in card in a machine that is shadowing the system and video ROMs in hardware.  
  67. The IBM PS/2 has 128K of RAM reserved to shadow the system and video ROM in 
  68. E000-FFFF.  If you use the ROM parameter on the QEMM line then QEMM would 
  69. waste 128K of RAM to duplicate this feature.  If you have a ROM on the disk 
  70. controller card or network card or the like then the PS/2 is not shadowing it.  
  71. You can use QEMM to shadow only the adapter ROM with a restricted ROM=MMMM-
  72. NNNN parameter, where MMMM is the beginning address of the adapter ROM and 
  73. NNNN is the ending address of the adapter ROM.
  74.  
  75. SHOULD I USE QEMM-386's ROM PARAMETER WHEN MY MACHINE IS ALREADY SHADOWING 
  76. ROM?
  77.  
  78.       No.  This will cause QEMM-386 to waste the memory it uses to shadow the 
  79. ROM, duplicating a feature already being provided by your hardware. Shadowing 
  80. a ROM twice will not improve system performance.
  81.      If your system is shadowing some, but not all of the ROMs, then a 
  82. restricted ROM=MMMM-NNNN parameter can be used to shadow only those ROMs not 
  83. being shadowed by the system already.  See the above paragraph for discussion 
  84. of this.
  85.      On some systems the 384K of ShadowRAM can be used as extended memory 
  86. instead.  On such systems it is a more efficient use of memory to have QEMM-
  87. 386 perform the service of shadowing the ROMs because QEMM-386 will only use 
  88. the amount of memory to shadow the ROMs equal to the amount of ROM to shadow. 
  89. It is is more common for the ShadowRAM not to be usable as extended memory.  
  90. On such machines, one wastes the ShadowRAM by disabling it.                     
  91.                                              
  92.  
  93. WHAT HAPPENS IF I ROM A PORTION OF THE ADDRESS SPACE THAT QEMM-386 IS NOT 
  94. DETECTING AS ROM?
  95.  
  96.      Nothing other than stop mapping the portion of the address space 
  97. specified as an argument to the ROM parameter.  QEMM-386 will not shadow a ROM 
  98. it does not detect as a ROM.
  99.  
  100. WHAT DOES THE NOSHADOWRAM (NOSH) PARAMETER DO?
  101.  
  102.       The NOSH parameter tells QEMM-386 not to use the system's unused 
  103. ShadowRAM.  On machines with Chips & Technologies (or compatible) ShadowRAM 
  104. (the only kind QEMM-386 can use) there is 384K of ShadowRAM.  Since no 
  105. computer has 384K of ROM to shadow some portion of this ShadowRAM is unused.  
  106. QEMM-386 tries to grab the unused portion of the ShadowRAM and allocate it to 
  107. the pool of useful memory.  It turns out that some programs may not function 
  108. properly if ShadowRAM is being used as Expanded Memory or High RAM (the 
  109. purposes to which QEMM-386 puts it); or some other company's implementation of 
  110. ShadowRAM may be sufficiently alike to Chips & Technologies ShadowRAM for QEMM-
  111. 386 to detect and try to use it even though it is not actually usable by QEMM-
  112. 386.  Because this may happen the NOSH parameter was invented.  Using the NOSH 
  113. parameter does NOT affect the system's use of ShadowRAM to shadow ROMs, it 
  114. simply prevents QEMM-386 from attempting to use the ShadowRAM.
  115.  
  116.  
  117. HOW DOES QEMM-386 USE THE SHADOWRAM?
  118.  
  119.       QEMM-386 creates High RAM and Expanded Memory by placing memory in the 
  120. previously unused address space between 640 and 1024K:  this is called 
  121. mapping. You can tell what portions of the address space QEMM-386 is mapping 
  122. by looking at the First Meg/Overview screen of Manifest: all of the address 
  123. space which is marked as "High RAM", "Page Frame", "Mappable", or "Rammable" 
  124. is being mapped by QEMM-386.  QEMM-386 uses all the ShadowRAM in the address 
  125. space it is mapping.
  126.      For any portion of the address space that QEMM-386 is not mapping (where 
  127. there are ROMs being shadowed by the system; portions of the address space 
  128. being occupied by other devices, such as the video card; portions of the 
  129. address space from which QEMM-386 is EXCLUDEd) QEMM-386 does not use the 
  130. ShadowRAM.
  131.      ShadowRAM must be used in 16K increments and on 16K boundaries.  An 
  132. entire 16K piece of ShadowRAM will not be used by QEMM-386 if any portion of 
  133. the 16K piece is not being mapped by QEMM-386. This is why a 4K exclude can 
  134. cause QEMM-386 to stop recovering a whole 16K of ShadowRAM.
  135.      QEMM-386 Stealths a Shadowed ROM in the same manner that it Stealths an 
  136. unshadowed ROM. The service hardware ShadowRAM provides is still active when a 
  137. ROM is Stealthed.  This is why no additional ShadowRAM is used by QEMM-386 
  138. when Stealthing even though it maps a larger portion of the address space.
  139.  
  140.  
  141. WHAT ABOUT RAMBIOS.SYS, FASTBIOS.SYS, RAPIDBIO.SYS...?
  142.  
  143.       These programs (and others like them) copy the video ROM into RAM to 
  144. provide the same shadowing feature that ShadowRAM provides, but for the video 
  145. ROM only.  These programs use conventional memory (or High RAM, if QEMM loads 
  146. them high) to load their code and make a copy of the video ROM. If your system 
  147. is already providing this feature in hardware, this is a waste of memory.  The 
  148. ROM shadowing feature of QEMM-386 provides the exact same service when used to 
  149. shadow the video ROM but does not load any extra code or use any additional 
  150. conventional memory or High RAM.  This is much more efficient.  For those who 
  151. have their video ROM at C000-C7FF, the appropriate ROM parameter is ROM=C000-
  152. C7FF.  
  153.  
  154. WHAT IS TOP MEMORY?
  155.  
  156.       Some machines (notably Compaqs and those with Micronics motherboards) 
  157. have a kind of memory called Top Memory.  This memory is in the Extended 
  158. memory address space at 16000-16384K, the "top" of the 16 Meg address space.  
  159. (The 80286 chip is limited to addressing 16 MB of memory.)
  160.  
  161.  
  162. WHY IS THERE TOP MEMORY?
  163.  
  164.       If you have one megabyte of memory installed in your computer, 640K of 
  165. it is conventional memory and 384K is left over.  In most machines this 384K 
  166. is extended memory, beginning at 1024K, ending at 1408K.  Some add-in extended 
  167. memory cards cannot begin addressing memory at 1408K, being limited to 
  168. beginning addressing on multiples of 512K.  Putting this 384K of memory at the 
  169. "top" of the address space leaves the address space beginning at 1024K free.
  170.  
  171. FOR WHAT DOES THE MACHINE USE TOP MEMORY?
  172.  
  173.       Many of these machines use their Top Memory to shadow ROMs.  In some 
  174. cases they do this by mapping a portion of the Top Memory into "vacant" 
  175. address space between 640K and 1024K and copying the contents of the target 
  176. ROM into this RAM.  A classic use of Top Memory for this purpose is to map 
  177. memory into E000-E7FF and copy the contents of the video ROM into this memory.  
  178. Compaq does this, though their video ROM is 24K large (E000-E5FF).
  179.  
  180.  
  181. HOW DO I KNOW IF I HAVE TOP MEMORY?
  182.  
  183.       The QEMM-386/Memory screen of MANIFEST will report the existence of Top 
  184. Memory on the line underneath the Extended line.
  185.  
  186.  
  187. WHAT DOES THE NOTOPMEMORY (NT) PARAMETER DO?
  188.  
  189.       This parameter tells QEMM-386 not to try to take control of the unused 
  190. portion of the Top Memory.  Using this parameter does NOT stop the system from 
  191. using Top Memory to provide the services Top Memory already performs with Top 
  192. Memory.  On Compaq computers QEMM-386 even takes control of the 128K portion 
  193. of the Top Memory that Compaq uses to shadow ROMs, then QEMM-386 shadows the 
  194. appropriate ROMs to provide the same service.  This action of QEMM- 386 
  195. continues even when the NT parameter is used.  The NCF parameter will cause 
  196. QEMM-386 to stop appropriating this portion of the Compaq's Top Memory.
  197.  
  198.  
  199. SHOULD I USE TOP MEMORY OR QEMM-386 TO SHADOW MY ROMS?
  200.  
  201.       You will probably find that if you use Top Memory to shadow your ROMs 
  202. that it uses more memory than is necessary because the Top Memory usually 
  203. needs to be used in 64K increments, while you may have a ROM that is not 64k 
  204. large.  If QEMM-386 is controlling your unused Top Memory then if you let QEMM-
  205. 386 shadow the ROMs only as much RAM as is necessary to shadow the ROM will be 
  206. used and QEMM-386 will recover all the unused Top Memory.  It is, of course, a 
  207. waste of memory to shadow your ROMs both with the system's Top Memory and QEMM-
  208. 386.  Note that the portion of the address space into which the computer maps 
  209. Top Memory to shadow its ROMs must be excluded from QEMM-386's mapping.  The 
  210. common location for this is E000-E7FF.  This cost of 32K of address space is 
  211. another good reason to stop shadowing ROM with the system's Top Memory and let 
  212. QEMM-386 do it.  On Compaqs, QEMM-386 does this automatically.  The 
  213. NOCOMPAQFEATURES (NCF) causes QEMM-386 not to do this automatically.
  214.  
  215.  
  216. SUMMARY
  217.  
  218.       Copying ROMs into RAM is a way to speed up your system's performance.   
  219. Many machines do this in the hardware.  QEMM-386 can also provide this feature 
  220. with the ROM parameter.  You can tell if your system hardware or QEMM-386 is 
  221. performing this service by looking at the First Meg/Timings screen of 
  222. MANIFEST:  If a portion of the address space occupied by ROM is running about 
  223. as fast as conventional memory (usually 0000-9FFF) then that ROM is being 
  224. shadowed.  There are also third-party programs (such as RAMBIOS.SYS, 
  225. RAPIDBIO.SYS, FASTBIOS.SYS) that can shadow video ROMs.  It is usually best to 
  226. enable the ShadowRAM feature in the hardware setup.  If your system does not 
  227. have this feature in the hardware setup you may wish to have QEMM-386 provide 
  228. it. It is a more efficient use of address space to have QEMM-386 provide this 
  229. feature, instead of a third-party program.  In any case it is wasteful to have 
  230. more than one provider performing this service.
  231.  
  232.  
  233.   ************************************************************************
  234.   *This technical note may be copied and distributed freely as long as it*
  235.   *is distributed in its entirety and it is not distributed for profit.  *
  236.   *         Copyright (C) 1990-2 by Quarterdeck Office Systems           *
  237.   ************************ E N D   O F   F I L E *************************
  238.